#include "Cats/CatStates/CatState.h"
#include "Character/Character.h"


CatState::CatState(BaseCat* pCatRef)
{
	_pCatRef = pCatRef;
	_pCharRef = Character::getInstance();
	_pGameMapRef = GameMap::getInstance();
	_pCatsManagerRef = CatsManager::getInstance();

	_stateIsPaused = false;
}

CatState::~CatState()
{
	_pCatRef = 0;
	_pCharRef = 0;
	_pGameMapRef = 0;
	_pCatsManagerRef = 0;
}

void CatState::onEnter()
{
	if (_stateIsPaused)
		onResume();
	else
		runOnEnter();
}

void CatState::onExit()
{
	_stateIsPaused = false;
}

void CatState::onPause()
{
	_stateIsPaused = true;
}

void CatState::onResume()
{
	_stateIsPaused = false;
}
